﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using TEL.ClientClasses;
using TEL.ClientClasses.SipInterfaces;


namespace TEL.TelPhoneF.Dialogs
{
    public partial class DialogSipAccount : DialogCustom, ClientClasses.SipInterfaces.ISipAccount
    {
        public DialogSipAccount()
        {
            InitializeComponent();
        }
        #region Implementation of ISipProperty

        public string UserNumder
        {
            get
            {
                return txtNumber.Text;
            }
            set { txtNumber.Text = value.ToString(); }
        }

        public string UserName
        {
            get { return txtUserName.Text; }
            set { txtUserName.Text = value; }
        }

        public string Password
        {
            get { return txtPassword.Text; }
            set { txtPassword.Text = value; }
        }

        public string Host
        {
            get { return txtHost.Text; }
            set { txtHost.Text = value; }
        }

        public int Port
        {
            get
            {
                int port = 0;
                int.TryParse(txtPort.Text, out port);
                return port;
            }
            set { txtPort.Text = value.ToString(); }
        }

        public string Transport
        {
            get { return "UDP"; }
            set { }
        }

        public int NotActiveLines
        {
            get { return radioButton1.Checked ? 0 : 1; }
            set
            {
                if (value == 0) radioButton1.Checked = true;
                if (value == 1) radioButton2.Checked = true;
            }
        }


        public string SRTP { get; set; }
        #endregion
    }
}